home *** CD-ROM | disk | FTP | other *** search
-
- // remove sections looking like this :-
-
- // Summary ...
- // ...
- // Total ...
-
- // - but also extract info from Total lines
-
- input "report.txt"
-
- do
- copy lines until (line beginsWith "Summary")
- skip lines until (line beginsWith "Total")
- leave if (not found)
- if (line matches "Total for ~(town), ~(month) ~(year): ~(total)")
- write ("--> " town ": " total " (" month " " year ")")
- else
- write ("*** unrecognised total line: " line)
- endif
-
- // comment out the next line to make the program run faster
- refresh
-
- loop
-